var csInterface = new CSInterface();

// 个人主页
var homePageElement = document.querySelector("#homePage");
homePageElement.addEventListener("click", callHomepage);

function callHomepage() {
  window.cep.util.openURLInDefaultBrowser('https://gitee.com/brzjomo');
}

// 调用函数1
var runButtonTransform = document.querySelector("#btn-transform");
runButtonTransform.addEventListener("click", buttonTransform);

// 函数1
function buttonTransform() {
  // 获取布尔-是否直接删除选择项
  // var IfDeleteDirectlyElement = document.getElementById("ifDeleteDirectly");
  // var ifDeleteDirectly = IfDeleteDirectlyElement.checked;

  // 获取布尔-是否提示选中对象周长
  // var ifPromoteItemLengthElement = document.getElementById("ifPromoteItemLength");
  // var ifPromoteItemLength = ifPromoteItemLengthElement.checked;

  // 获取对象宽度
  var objectWidth = document.getElementsByName("objectWidth")[0].value;

  // 获取对象高度
  var objectHeight = document.getElementsByName("objectHeight")[0].value;

  csInterface.evalScript('batchtransform(' + objectWidth + ', ' + objectHeight + ')');

  // csInterface.evalScript('batchtransform(' + objectWidth + ', ' + objectHeight + ', ' + ifDeleteDirectly + ', ' + ifPromoteItemLength +')');
}

